package myschool.myshchool15.homework;

import java.util.Scanner;

public class ShoppingSettlement {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("MyShopping管理系统 > 购物结算");
        System.out.println("**************************************");
        System.out.println("请选择购买的商品编号：");
        System.out.println("1、T恤\t2、网球鞋\t3、网球拍");
        System.out.println("**************************************");
        String yes="y";
        int number;
        while( yes.equals("y")){
        System.out.println("请输入商品编号：");
        number = input.nextInt();
        switch(number){
            case 1:
                System.out.println("T恤\t\t￥245.0");
                break;
            case 2:
                System.out.println("网球鞋\t\t￥570.0");
                break;
            case 3:
                System.out.println("网球拍\t\t￥320.0");
                break;
            default:
                System.out.println("请输入正确的编号！");
            };
            System.out.println("是否继续（y/n）");
            yes = input.next();

        }
        System.out.println("结束浏览");

    }
}
